<template>
	<view>
		<view class="content u-page">
			<view class="bg-box">

			</view>
			<view class="card">
				<view class="left">
					<view class="title">
						<text>专属特权</text>
					</view>
					<view class="name">
						<text>游客dfgldkgsd2ds1f</text>
					</view>
					<view class="status">
						<text>会员状态：普通用户</text>
					</view>
				</view>
				<view class="right">
					<image src="/static/vip.png" mode=""></image>
				</view>
			</view>
			<view class="method-one">
				<view class="title">
					<text>方式一</text>
				</view>
				<grid></grid>
				<view class="button-box">
					<u-button size="medium" shape="circle" :custom-style="customStyle">开通会员</u-button>
				</view>
			</view>
			<view class="method-two">
				<view class="title">
					<text>方式二</text>
				</view>
				<view class="input-box">
					<u-input v-model="value" :type="type" :border="border" :placeholder='placeholder'
						input-align="center" />
				</view>
				<view class="button-box">
					<u-button size="medium" shape="circle" :custom-style="customStyle">立即兑换</u-button>
				</view>
			</view>
			<view class="agreement">
				<view class="title">
					<text>会员协议</text>
				</view>
				<view class="subtitle">
					<text>会员协议</text>
				</view>
			</view>
			<view class="test" @click="toCourseOrder">
				课程订单入口,点击进入
			</view>
		</view>
		<!-- tabbar -->
		<u-tabbar v-model="currentTab" :list="tabbar"></u-tabbar>
	</view>
</template>

<script>
	import {
		tabbar
	} from '@/common/tabbar.js'
	import grid from './components/grid.vue'
	export default {
		data() {
			return {
				currentTab: 2,
				tabbar: tabbar,
				//button样式
				customStyle: {
					backgroundColor: '#333333',
					color: '#D8BF88'
				},
				//input样式
				value: '',
				type: 'text',
				border: true,
				placeholder: '请输入您的兑换码'
			}
		},
		components: {
			grid
		},
		methods: {
			toCourseOrder(){
				uni.navigateTo({
					url:"../courseOrder/courseOrder"
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.test{
		font-size: 40rpx;
		color: green;
		height: 100rpx;
		text-align: center;
	}
	.content {
		position: relative;

		.bg-box {
			background-color: #000;
			width: 100%;
			height: 300rpx;
		}

		.card {
			position: absolute;
			top: 40rpx;
			left: 30rpx;
			width: 690rpx;
			height: 320rpx;
			border-radius: 20rpx;
			background-color: #333333;
			display: flex;
			justify-content: space-between;

			.left {
				margin: 40rpx 0 0 40rpx;

				.title {
					color: #E7CB90;
					font-size: 36rpx;
					font-weight: bold;
				}

				.name {
					font-size: 30rpx;
					color: #fff;
					margin: 40rpx 0;
				}

				.status {
					font-size: 28rpx;
					color: #fff;
					margin-top: 60rpx;
				}
			}

			.right {
				width: 100rpx;
				height: 100rpx;
				overflow: hidden;
				margin: 50rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}
		}

		.method-one {
			margin-top: 100rpx;
			padding-left: 30rpx;

			.title {
				color: #E7CB90;
				font-size: 32rpx;
				font-weight: bold;
			}

			.button-box {
				width: 690rpx;
				text-align: center;
				margin-top: 30rpx;
			}
		}

		.method-two {
			margin-top: 20rpx;
			padding: 0 30rpx;

			.title {
				color: #E7CB90;
				font-size: 32rpx;
				font-weight: bold;
			}

			.input-box {
				margin-top: 20rpx;
			}

			.button-box {
				width: 690rpx;
				text-align: center;
				margin-top: 30rpx;
			}
		}

		.agreement {
			margin-top: 20rpx;
			padding: 0 30rpx;

			.title {
				color: #E7CB90;
				font-size: 32rpx;
				font-weight: bold;
			}

			.subtitle {
				font-size: 32rpx;
				margin: 20rpx 0;
			}
		}
	}
</style>
